package com.atguigu.f_array;

public class Demo5 {
    public static void main(String[] args) {
        //创建一个数组
        int[] arr1 = {1,2,3,4,5};
        System.out.println("arr1 = " + arr1);//地址

        for (int i = 0; i < arr1.length; i++) {
            System.out.println(arr1[i]);
        }

        //???
        int[] arr2 = arr1;

        arr2[3] = 300;

        for (int i = 0; i < arr1.length; i++) {
            System.out.println(arr1[i]);
        }

        for (int i = 0; i < arr2.length; i++) {
            System.out.println(arr2[i]);
        }
    }
}
